#pragma once
#include <boost/noncopyable.hpp>
#include "GameStateDirector.h"

namespace ja2{ namespace sgp
{
	class CursorManager;
	class VideoManager;
	class InputManager;
	class MouseRegionManager;
} /*sgp*/} /*ja2*/

namespace ja2
{
	class IGameHandler;

	//! Game manager class.
	class GameManager : boost::noncopyable
	{
		// Typedefs
	private:
		typedef std::shared_ptr<IGameHandler> IGameHandlerPtr_t;

		// Attributes
	private:
		//! Video manager.
		sgp::VideoManager &m_VideoManager;
		//! Cursor manager.
		sgp::CursorManager &m_CursorManager;
		//! Input manager.
		sgp::InputManager &m_InputManager;
		//! Mouse region manager.
		sgp::MouseRegionManager &m_MouseRegionManager;
		//! Game state director.
		GameStateDirector m_State;
		//! Active game handler.
		IGameHandlerPtr_t m_pActiveHandler;

		// Operations
	public:
		//! Run loop.
		void run();

		// Construction/Destruction
	public:
		GameManager(sgp::VideoManager &VideoManager, sgp::CursorManager &CursorManager_, sgp::InputManager &InputManager, sgp::MouseRegionManager &MouseRegionManager);
	};
} /*ja2*/
